[qemu] Use domain-name in VNC window title.
authorchris@kneesaa.uk.xensource.com <chris@kneesaa.uk.xensource.com>
Wed, 26 Jul 2006 13:26:03 +0000 (14:26 +0100)
committerchris@kneesaa.uk.xensource.com <chris@kneesaa.uk.xensource.com>
Wed, 26 Jul 2006 13:26:03 +0000 (14:26 +0100)
Set the VNC window title with domain-name.

Signed-off-by: Yang Xiaowei <xiaowei.yang@intel.com>
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
tools/ioemu/patches/series
tools/ioemu/patches/vnc-title-domain-name [new file with mode: 0644]
tools/ioemu/vnc.c

index 5fc4d15c7fb2d0fd23e6b5443dc8ada0505fa075..3ee864655057a5b93473bd7dac2445ba725a72e3 100644 (file)
@@ -32,3 +32,4 @@ acpi-poweroff-support
 vnc-cleanup
 vnc-fixes
 vnc-start-vncviewer
+vnc-title-domain-name
diff --git a/tools/ioemu/patches/vnc-title-domain-name b/tools/ioemu/patches/vnc-title-domain-name
new file mode 100644 (file)
index 0000000..3fb1491
--- /dev/null
@@ -0,0 +1,25 @@
+Index: ioemu/vnc.c
+===================================================================
+--- ioemu.orig/vnc.c   2006-07-26 14:23:52.426074956 +0100
++++ ioemu/vnc.c        2006-07-26 14:24:15.210558295 +0100
+@@ -850,6 +850,7 @@
+ static int protocol_client_init(VncState *vs, char *data, size_t len)
+ {
++    size_t l;
+     char pad[3] = { 0, 0, 0 };
+     vs->width = vs->ds->width;
+@@ -886,8 +887,10 @@
+       
+     vnc_write(vs, pad, 3);           /* padding */
+-    vnc_write_u32(vs, 4);        
+-    vnc_write(vs, "QEMU", 4);
++    l = strlen(domain_name); 
++    vnc_write_u32(vs, l);        
++    vnc_write(vs, domain_name, l);
++
+     vnc_flush(vs);
+     vnc_read_when(vs, protocol_client_msg, 1);
index 0450f4bcb80d34e328e6391d440b2043168f4425..b2d539ec937f2755d4cf59ed2ab3af9567129e73 100644 (file)
@@ -850,6 +850,7 @@ static int protocol_client_msg(VncState *vs, char *data, size_t len)
 
 static int protocol_client_init(VncState *vs, char *data, size_t len)
 {
+    size_t l;
     char pad[3] = { 0, 0, 0 };
 
     vs->width = vs->ds->width;
@@ -886,8 +887,10 @@ static int protocol_client_init(VncState *vs, char *data, size_t len)
        
     vnc_write(vs, pad, 3);           /* padding */
 
-    vnc_write_u32(vs, 4);        
-    vnc_write(vs, "QEMU", 4);
+    l = strlen(domain_name); 
+    vnc_write_u32(vs, l);        
+    vnc_write(vs, domain_name, l);
+
     vnc_flush(vs);
 
     vnc_read_when(vs, protocol_client_msg, 1);